﻿using System.Web.Security;

namespace Xoohoo.Infrastructure
{
    public class FormsAuthenticationWrapper : IFormsAuthentication
    {
        /// <summary>
        /// 设置认证Cookie
        /// </summary>
        /// <param name="username">用户名</param>
        /// <param name="createPersistentCookie">是否创建持久Cookie</param>
        public void SetAuthCookie(string username, bool createPersistentCookie)
        {
            FormsAuthentication.SetAuthCookie(username, createPersistentCookie);
        }

        /// <summary>
        /// 注销
        /// </summary>
        public void SignOut()
        {
            FormsAuthentication.SignOut();
        }
    }
}
